import 'dart:ui';

import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';

///颜色util
class ColorUtils {
  static const color_main_half = Color(0x50dcbe9b);
  static const color_main = Color(0xffdcbe9b);
  static const color_6ebde = Color(0xffefe2d5);
  static const color_f2f2f2 = Color(0xfff2f2f2);
  static const color_white = Color(0xffffffff);
  static const color_black = Color(0xff000000);
  static const color_transparent = Color(0x00000000);
  static const color_fd6d35 = Color(0xfffd6d35);
  static const color_2acaff = Color(0xff2acaff);
  static const color_0d94fd = Color(0xff0d94fd);
  static const color_222222 = Color(0xff222222);
  static const color_333333 = Color(0xff333333);
  static const color_666666 = Color(0xff666666);
  static const color_999999 = Color(0xff999999);
  static const color_e0e0e0 = Color(0xffe0e0e0);
  static const color_455262 = Color(0xff455262);
  static const color_red = Colors.red;
  static const color_d81e06 = Color(0xffd81e06);
  static const color_777777 = Color(0xff777777);
  static const color_888888 = Color(0xff888888);
  static const color_f3d2af = Color(0xfff3d2af);
  static const color_b49473 = Color(0xffb49473);
  static const color_a18768 = Color(0xffa18768);
  static const color_696969 = Color(0xff696969);
  static const color_383838 = Color(0xff383838);
  static const color_8e8e93 = Color(0xff8e8e93);
  static const color_f9f6f1 = Color(0xfff9f6f1);
  static const color_c39d6e = Color(0xffc39d6e);
  static const color_cccccc = Color(0xffcccccc);
  static const color_d4d4d4 = Color(0xffd4d4d4);
  static const color_d8d8d8 = Color(0xffd8d8d8);
  static const color_dedede = Color(0xffdedede);
  static const color_979797 = Color(0xff979797);
  static const color_f6f6f6 = Color(0xfff6f6f6);
  static const color_409eff = Color(0xff409eff);
  static const color_67c23a = Color(0xff67c23a);
  static const color_90c2f3aa = Color(0x90c2f3aa);
  static const color_50ef0c06 = Color(0xffec3a20);
  static const color_ec3a20 = Color(0xffec3a20);
  // static const color_128_74_255 = Color.fromARGB(255, 128, 74, 255);

}

///assets 名称util
class DrawableUtils {
  static const assets = "assets/";
  static const assets_images = "assets/images/";
  static const assets_audios = "assets/audios/";
  static const _png = ".png";
  static const _jpg = ".jpg";
  static const _svg = ".svg";
  static const _html = ".html";
  static const _mp3 = ".mp3";

  static const nodata_img = "${assets_images}nodata_img$_png";
  static const editcloseimg = "${assets_images}editcloseimg$_png";
  static const eye_close = "${assets_images}eye_close$_png";
  static const eye_show = "${assets_images}eye_show$_png";
  static const icon_arrow_left_white = "${assets_images}icon_arrow_left_white$_png";
  static const icon_arrow_right_black = "${assets_images}icon_arrow_right_black$_png";
  static const icon_arrow_down = "${assets_images}icon_arrow_down$_png";
  static const icon_arrow_up = "${assets_images}icon_arrow_up$_png";
  static const common_default_head = "${assets_images}common_default_head$_png";
  static const icon_close = "${assets_images}icon_close$_png";
  static const icon_logo = "${assets_images}icon_logo$_png";

  static const icon_unselected = "${assets_images}icon_unselected$_png";
  static const icon_selected = "${assets_images}icon_selected$_png";
  static const icon_add_default_img = "${assets_images}icon_add_default_img$_png";
  static const icon_splash_bg = "${assets_images}icon_splash_bg$_png";
  static const app_bar_bg = "${assets_images}app_bar_bg$_png";
  static const icon_create_round = "${assets_images}icon_create_round$_png";

  static const icon_notice = "${assets_images}icon_notice$_png";



}

///像素Util
class PxUtils {
  static final screenWidth = setSize(ScreenUtil.getInstance().screenWidth);
  static final screenHeight = setSize(ScreenUtil.getInstance().screenHeight);
  static final statusBarHeight = setSize(ScreenUtil.getInstance().statusBarHeight);
  static final px_0 = setSize(0);
  static final px_0d5 = setSize(0.5);
  static final px_1 = setSize(1);
  static final px_2 = setSize(2);
  static final px_3 = setSize(3);
  static final px_4 = setSize(4);
  static final px_5 = setSize(5);
  static final px_6 = setSize(6);
  static final px_7 = setSize(7);
  static final px_7d5 = setSize(7.5);
  static final px_8 = setSize(8);
  static final px_9 = setSize(9);
  static final px_10 = setSize(10);
  static final px_12 = setSize(12);
  static final px_13 = setSize(13);
  static final px_14 = setSize(14);
  static final px_15 = setSize(15);
  static final px_16 = setSize(16);
  static final px_17d5 = setSize(17.5);
  static final px_18 = setSize(18);
  static final px_20 = setSize(20);
  static final px_22 = setSize(22);
  static final px_24 = setSize(24);
  static final px_25 = setSize(25);
  static final px_26 = setSize(26);
  static final px_28 = setSize(28);
  static final px_30 = setSize(30);
  static final px_32 = setSize(32);
  static final px_35 = setSize(35);
  static final px_36 = setSize(36);
  static final px_38 = setSize(38);
  static final px_39d5 = setSize(39.5);
  static final px_40 = setSize(40);
  static final px_42 = setSize(42);
  static final px_44 = setSize(44);
  static final px_46 = setSize(46);
  static final px_48 = setSize(48);
  static final px_50 = setSize(50);
  static final px_54 = setSize(54);
  static final px_56 = setSize(56);
  static final px_58 = setSize(58);
  static final px_60 = setSize(60);
  static final px_62 = setSize(62);
  static final px_64 = setSize(64);
  static final px_65 = setSize(65);
  static final px_68 = setSize(68);
  static final px_70 = setSize(70);
  static final px_78 = setSize(78);
  static final px_91 = setSize(91);
  static final px_80 = setSize(80);
  static final px_100 = setSize(100);
  static final px_104 = setSize(104);
  static final px_116 = setSize(116);
  static final px_120 = setSize(120);
  static final px_180 = setSize(180);
  static final px_220 = setSize(220);
  static final px_300 = setSize(300);
  static final px_335 = setSize(335);
  static final px_400 = setSize(400);



  //统一设置长度
  static double setSize(double dp) {
    return ScreenUtil.getInstance().getAdapterSize(dp);
  }
}

///字符Util
class StringUtils {
  static var appname = 'TPLIB';
  static var neterror = '网络错误';
  static var nodata = '暂无数据~';
  static const privacy = '权限';
  static var clickrefresh = '点击刷新';
  static const no = '无';
  static var opersuccess = '操作成功';
  static var notgetinfo = '未查询到信息';
  static var openbrowserfail = '打开浏览器失败';
  static var updatepoint='您有新的版本，去更新';


  static var logout='退出登录';
  static var hello='您好';
  static var logintopoint='欢迎登录$appname';

  static var areyousure='确定要';

  static var cancel='取消';

  static var account='账户';
  static const pleaseinput='请输入';
  static const password='密码';
  static String origin='原';
  static String originstart='原始';

  static const confirm='确认';
  static var sure='确定';
  static var reject='驳回';
  static var pass='通过';

  static var login='登录';
  static var logining='登录中...';

  static var please='请';
  static String agree='同意';

  static String readand='阅读并';
  static String useprivacyagreement='用户隐私协议';
  static String useagreement='用户协议';
  static String privacypolicy='隐私政策';

  static String he='和';

  static var forgetpassword='忘记密码';

  static var getcode='获取验证码';

  static var code='验证码';



  //统一显示，以便修改时就只在此改一处
  static String showString(String msg) {
    return msg;
  }
}